package com.example.springioc.controller;

import com.example.springioc.model.UserInfo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;

@Controller
public class HelloController {
    @Autowired
    private UserInfo userInfo;
    public void sayhi(){
        userInfo.doService();  //属性注入依赖
        System.out.println("hi,userController");
    }
}
